package com.sunny.design.proxy;

/**
 * 被代理类
 *
 * @author Sunny
 * @date 2020/1/1 17:00
 */
public class OrderService implements IOrderService {
    private OrderDao orderDao;

    public OrderService() {
        this.orderDao = new OrderDao();
    }

    @Override
    public int createOrder(Order order) {
        System.out.println("OrderService 调用 orderDao 创建订单");
        return orderDao.insert(order);
    }
}
